/**
 * 文件名：ArrivalNoticeMapper.java
 * 版权：Copyright Lightkit All Rights Reserved.
 * 描述：到货头表mapper
 */
package com.lightkits.wms.database.dao.arrivalnotice;

import com.lightkits.wms.database.model.arrivalnotice.ArrivalInfoModel;
import com.lightkits.wms.database.model.arrivalnotice.ArrivalNoticeLineModel;
import com.lightkits.wms.database.model.arrivalnotice.ArrivalNoticeModel;
import com.lightkits.wms.database.model.arrivalnotice.NewArrivalLineModel;
import com.lightkits.wms.database.model.arrivalnotice.NewSearchModel;
import com.lightkits.wms.database.model.arrivalnotice.ReceiveInfoModel;
import com.lightkits.wms.database.model.arrivalnotice.TicketLinePoNumModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author jie.ao@hand-china.com
 * @create 2019-07-02 16:48
 * @desc
 **/
@Mapper
public interface ArrivalNoticeMapper {

    /**
     * 头上取值
     * @param ticketNum 到货号
     * @param organizationName 组织
     * @param partyName 供应商
     * @return 查询到实体
     */
    List<ArrivalNoticeModel> queryArrivalNoticeList(@Param("ticketNum") String ticketNum,
                                                    @Param("organizationName") String organizationName,
                                                    @Param("partyName") String partyName);
    /**
     * 到货行取值
     * @param ticketId 到货头id
     * @param partyId 供应商id
     * @return 到货行的信息
     */
    List<ArrivalNoticeLineModel> queryArrivalNoticeLineList(@Param("ticketId") String ticketId,
                                                            @Param("partyId") String partyId);

    /**
     * 获取历史到货信息
     * @param itemId 物料id
     * @return 历史到货信息model
     */
    List<ArrivalInfoModel> queryArrivalInfo(@Param("itemId") String itemId);

    /**
     * 获取接受货位信息
     * @param tickLineId 到货行id
     * @return 接收货位信息
     */
    List<ReceiveInfoModel> queryReceiveInfo(@Param("tickLineId") String tickLineId);

    /**
     * 新建到货行弹出的List
     * @param poNum 采购订单号
     * @param itemCode 物料code
     * @param planTime 计划到货时间从
     * @param planTimeTo 计划到货时间至
     * @return 新建货位的信息
     */
    List<NewArrivalLineModel> queryNewArrivalLineLOV(@Param("poNum") String poNum,
                                                     @Param("itemCode") String itemCode,
                                                     @Param("planTime") String planTime,
                                                     @Param("planTimeTo") String planTimeTo);

    /**
     * 搜索框数据
     * @param partyId 供应商id
     * @return poNum和itemCode
     */
    List<NewSearchModel> queryNewSearch(@Param("partyId") Long partyId);

    /**
     * 查询poNum与ticketLineId的对应关系
     * @param ticketLineIdList ticketLineIdList
     * @return List<TicketLinePoNumModel>
     */
    List<TicketLinePoNumModel> queryTicketLinePoNum(@Param("ticketLineIdList") List<Long> ticketLineIdList);
}
